home *** CD-ROM | disk | FTP | other *** search
- ;----------------------------------------------------------------------------
- ;File name: T_RANDOM.DOC Revision date: 1997.08.10
- ;Creator: Ulf Ronald Andersson Creation date: 1997.08.01
- ;(c)1997 by: Ulf Ronald Andersson All rights reserved
- ;Feedback to: dlanor@oden.se Released as FREEWARE
- ;----------------------------------------------------------------------------
- ;--- !!! --- Please read the full text below at least once. --- !!! ---
- ;This will help you avoid some simple but otherwise inescapable problems.
- ;----------------------------------------------------------------------------
-
- T_RANDOM is a simple program that generates a random number and uses that
- as if it were a network time specification to set the realtime clock.
- It serves no other purpose than this, and exists only to let me test my
- time server software thoroughly. I have included it in this release mainly
- as part of my policy of keeping everything available to the public.
-
- This program will run as ACC, APP, GTP, PRG, TOS, or TTP program, under all
- known system environments with any Atari TOS compatibility.
-
- This program has no user interface, and will simply randomize the system time
- setting each time it is invoked.
-
- Programmers may be interested in studying the pseudorandom generator which
- is formed by subroutines 'rand_long', 'rand_31_long' and 'rand_31_word'.
- This is a proper 31-bit pseudorandom generator going through all 2^31-1
- possible combinations (zero excluded). I have modified the pure shift
- register simulation so as to be able to generate 16 bits per go, which
- makes it one of the fastest generators around. Also, although the shift
- randomicity is based on 31 bits, the output data is 32 bits wide, all of
- which are separate bits of the random bit stream.
-
- Entry points 'rand_31_long' and 'rand_31_word' will transform a 32 bit seed
- number in d0 by 32 and 16 normal generator steps each. Thus the former gives
- an entirely new longword for each call, while the latter gives a short word.
-
- I will probably add functions based on these routines to my development
- libraries later, considering the very low quality and hopeless inefficiency
- of the Random function in XBIOS.
-
- ;----------------------------------------------------------------------------
- ;End of file: T_RANDOM.DOC
- ;----------------------------------------------------------------------------
-